home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource for Source: C/C++
/
Resource for Source - C-C++.iso
/
codelib9
/
v_11_01
/
1101095a
< prev
next >
Wrap
Text File
|
1995-11-01
|
419b
|
21 lines
// fa3.cpp - a dynamic array of float with operator[]
// as both const and non-const member functions
#include "fa3.h"
#include <assert.h>
// other float_array member function definitions ...
const float &float_array::operator[](size_t i) const
{
assert(i < len);
return array[i];
}
float &float_array::operator[](size_t i)
{
assert(i < len);
return array[i];
}